package com.guo.hui.test;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;

import com.guo.hui.dao.blog.TpArticleMapper;
import com.guo.hui.dao.blog.TpTimelineMapper;
import com.guo.hui.dao.shiro.TpPermissionMapper;
import com.guo.hui.dao.shiro.TpRoleMapper;
import com.guo.hui.dao.shiro.TpUserMapper;
import com.guo.hui.model.blog.TpTimeline;
import com.guo.hui.model.shiro.TpUser;
import com.guo.hui.service.TimeLineService;

@ContextConfiguration(locations = { "classpath:spring-mybatis.xml", "classpath:spring-service.xml",
		"classpath:spring-redis.xml"})
public class UnitCacheRedis extends AbstractJUnit4SpringContextTests {
	@Autowired
	private TpUserMapper tpUserDao;
	@Autowired
	private TpRoleMapper tpRoleDao;
	@Autowired
	private TimeLineService timelineService;

	@Test
	public void test() {
		Date dd = new Date();
		Map<String, Object> map = new HashMap<String, Object>();
		List<TpTimeline> list = timelineService.queryByMap(map);
		System.out.println(list);
		Date dd1 = new Date();
		long tt = dd1.getTime() - dd.getTime();
		System.out.println(tt);
	}

}
